<%-- 
    Document   : showdownloads
    Created on : Jun 25, 2012, 10:42:56 AM
    Author     : FRIENDS
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
         <link rel="stylesheet" href="./css/poststyle.css" type="text/css" media="screen" />
    </head>
    <body>
        <h2>materials for course <%=request.getParameter("courseid")%></h2>
         <div id="art-page-background-glare-wrapper">
    <div id="art-page-background-glare"></div>
</div>
        <%
        String description,issuedate,userid,url;
        PreparedStatement p=dbconnector.DBDriver.getPrepare("select * from  coursecontent where courseid=?");
        p.setString(1, request.getParameter("courseid"));
        ResultSet rs=p.executeQuery();
        while(rs.next())
                       {
                       description=rs.getString(2);
                       issuedate=rs.getString(3);
                       userid=rs.getString(4);
                       url=rs.getString(5);
                       %>
                       <div id="art-main">
    <div class="cleared reset-box"></div>
    <div class="art-box art-sheet">
        <div class="art-box-body art-sheet-body">
            <div class="art-layout-wrapper">
                <div class="art-content-layout">
                    <div class="art-content-layout-row">
                        <div class="art-layout-cell art-content">
<div class="art-box art-post">
    <div class="art-box-body art-post-body">
<div class="art-post-inner art-article">
                                <div class="art-postmetadataheader">
                                        <h2 class="art-postheader"> </h2>
                                        
                                        
                            <div class="art-postheadericons art-metadata-icons">
                                <span class="art-postdateicon">uploaded on :<%=issuedate%></span> | <span class="art-postauthoricon">Uploaded by <a href="#" title=""><%=userid%></a></span> | 
                                <span class="art-postediticon"><a href="downloadmaterial?url=<%=url%>">download</a></span>
                            </div> 
                                </div>
                                <div class="art-postcontent"><%=description%></div>
</div>
    </div>
</div>

                        </div>
                    </div>
                </div>
            </div>
  		<div class="cleared"></div>
        </div>
    </div>
    
</div>
<% } %>
    </body>
</html>
